package com.usian.common.model.course;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * @projectName: day05_mohongwei_parent
 * @package: com.jiyun.common.model.course
 * @className: CourseComment
 * @author: 莫洪维
 * @email: 1204315800@qq.com
 * @description: 课程评论表
 * @date: 2023/9/7 16:23
 */
@Data
@Document(collection = "comment")
public class CourseComment implements Serializable {
    @Id
    private Long id;
    @Field("commentContent")
    private String commentContent;
    @Field("memberId")
    private Long memberId;
    @Field("courseId")
    private Long courseId;
    @Field("pid")
    private Long pid;
    @Field("createDate")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date createDate;
}
